The present invention relates to a snapshot management apparatus and method, and a storage system. This invention is preferably applied to, for example, a storage system designed to provide a large-scale snapshot environment by connecting a plurality of external storage apparatuses.
Conventionally, as one function of a NAS (Network Attached Storage) server or a disk array apparatus, there is a so-called “snapshot function” of retaining an image of a designated operational volume (that is a logical volume to or from which data is written or read into a host system) upon receiving a snapshot creation instruction. The snapshot function is used to restore the operational volume to the state it was in at a designated time when, for example, data is lost by human error or when the state of the file system at a particular time needs to be restored.
A snapshot that is the image of the operational volume retained by the snapshot function (sometimes referred to as “virtual volume”) is not the data of the entire operational volume at the time of receipt of the snapshot creation instruction, but is composed of the data of the current operational volume and difference data that is the difference between the operational volume at the time of receipt of the snapshot creation instruction and the current operational volume. Based on the difference data and the current operational volume data, the content of the operational volume is restored to the state it was in at the time of receipt of the snapshot creation instruction. Accordingly, the snapshot function has the advantageous effect of being able to maintain the image of the operational volume by using a smaller storage capacity than would be the case if the content of the entire operational volume were stored.
Lately, a method for maintaining snapshots of plural generations has been suggested (see JP-A-2004-342050). For example, JP-A-2004-342050 suggests managing snapshots of plural generations by using a mapping table that associates each block of an operational volume with each block of a difference volume that stores difference data of a snapshot of each generation.
Also in recent years, JP-A-2004-005370 discloses a method for effectively utilizing an old storage apparatus without remodelling it when a new storage apparatus is introduced. By combining the method disclosed in JP-A-2004-342050 and the method disclosed in JP-A-2004-005370, it has become possible to easily construct a larger-scale snapshot environment by using a plurality of external storage apparatuses.
However, by the snapshot management method disclosed in JP-A-2004-342050, a single mapping table is used to centrally manage all the snapshots. Accordingly, as the number of created snapshots increases, the scale of the mapping table becomes larger and the frequency of access to the mapping table by data write processing increases. There is also a problem of poor accessibility to the mapping table due to the expansion of the scale of the mapping table.
Where a mapping table is retained in a storage apparatus so that snapshots can be restored even after reactivation of a server, its disadvantage is that all the snapshots may be lost if a failure occurs in the storage apparatus. This problem tends to easily occur when an external storage apparatus connected via a network is used. The operation of the snapshot function can no longer be continued just because the storage apparatus retaining the mapping table becomes inaccessible due to line disturbance.
As a means of solving the above-described problem, there is a method for retaining, in a plurality of storage apparatuses, copies of a mapping table necessary to maintain snapshots. This method has the advantage of being able to continue the operation of the snapshot function even if a failure occurs at part of the storage apparatuses.
However, there is a problem in that the size of a mapping table is large in order to contain entries to cover all blocks of the operational volume, and therefore, a large storage capacity is required to retain a plurality of mapping tables. There is also the problem of synchronization of the processing for updating the mapping tables retained by the respective storage apparatuses.
By any of the methods described above, the mapping tables relevant to all the snapshots need to be accessed when data is written to the operational volume and the difference data is saved in the difference volume. Therefore, when many snapshots are retained, writing speed decreases due to overhead, thereby leaving the problem of the performance of the entire system deteriorating.